package com.lsx.logisticscore.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

@Data
public class Car implements Serializable {

    @TableId(type = IdType.AUTO)
    private Integer carId;

    private String carType;

    private String managerId;

    private String managerName;

    private Date entryDate;

    private String state;

    private static final long serialVersionUID = 1L;

    public String getEntryDate() {
        if (this.entryDate != null) {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
            String date = sdf.format(this.entryDate);
            return date;
        }
        return null;
    }

}
